package com.neoCalf.neoUser.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neoCalf.neoCommon.entity.UserInfoBeauty;
import com.neoCalf.neoUser.mapper.UserInfoBeautyMapper;
import com.neoCalf.neoUser.pro.UserInfoBeautyPro;
import com.neoCalf.neoUser.service.UserInfoBeautyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author 小牛
 * @version 1.0
 * @description TODO
 * @date 2025/4/17 12:44
 */
@Service("userInfoBeautyImpl")
@Slf4j
public class UserInfoBeautyImpl extends ServiceImpl<UserInfoBeautyMapper, UserInfoBeauty> implements UserInfoBeautyService {
    @Autowired
    private UserInfoBeautyPro userInfoBeautyPro;

    /**
     * 初始化靓号
     */
    @Override
    public void initUserInfoBeauty() {
        UserInfoBeauty userInfoBeauty = new UserInfoBeauty(
                userInfoBeautyPro.getId(),
                userInfoBeautyPro.getUserId(),
                userInfoBeautyPro.getEmail(),
                userInfoBeautyPro.getStatus()
        );
        try {
            save(userInfoBeauty);
            log.info("--初始化靓号成功--");
        } catch (Exception e) {
            log.info("--已初始化靓号--");
        }
    }
}
